예제 #1
0
 public function process($paymentInfo, $function)
 {
     // initilize paypal class
     $paypal = new Paypal();
     if ($function == "DoDirectPayment") {
         return $paypal->DoDirectPayment($paymentInfo);
     }
     if ($function == "SetExpressCheckout") {
         return $paypal->SetExpressCheckout($paymentInfo);
     }
     if ($function == "GetExpressCheckoutDetails") {
         return $paypal->GetExpressCheckoutDetails($paymentInfo);
     }
     if ($function == "DoExpressCheckoutPayment") {
         return $paypal->DoExpressCheckoutPayment($paymentInfo);
     }
     if ($function == "DoVoid") {
         return $paypal->DoVoid($paymentInfo);
     }
     if ($function == "DoReauthorization") {
         return $paypal->DoReauthorization($paymentInfo);
     }
     if ($function == "DoCapture") {
         return $paypal->DoCapture($paymentInfo);
     }
     if ($function == "DoRefund") {
         return $paypal->DoRefund($paymentInfo);
     }
     return "Function Does Not Exist!";
 }
예제 #2
0
 function processPayment($paymentInfo, $function)
 {
     $paypal = new Paypal();
     if ($function == "DoDirectPayment") {
         return $paypal->DoDirectPayment($paymentInfo);
     } elseif ($function == "SetExpressCheckout") {
         return $paypal->SetExpressCheckout($paymentInfo);
     } elseif ($function == "GetExpressCheckoutDetails") {
         return $paypal->GetExpressCheckoutDetails($paymentInfo);
     } elseif ($function == "DoExpressCheckoutPayment") {
         return $paypal->DoExpressCheckoutPayment($paymentInfo);
     } else {
         return "Function Does Not Exist!";
     }
 }
예제 #3
0
파일: paypal.php 프로젝트: rogerwu99/GF
 function processPayment($paymentInfo, $function)
 {
     $paypal = new Paypal();
     if ($function == "DoDirectPayment") {
         return $paypal->DoDirectPayment($paymentInfo);
     } elseif ($function == "SetExpressCheckout") {
         return $paypal->SetExpressCheckout($paymentInfo);
     } elseif ($function == "GetExpressCheckoutDetails") {
         return $paypal->GetExpressCheckoutDetails($paymentInfo);
     } elseif ($function == "DoExpressCheckoutPayment") {
         return $paypal->DoExpressCheckoutPayment($paymentInfo);
     } elseif ($function == "CreateRecurringPayments") {
         return $paypal->CreateRecurringPayments($paymentInfo);
     } elseif ($function == "UpdateRecurringPaymentsProfile") {
         return $paypal->UpdateRecurringPaymentsProfile($paymentInfo);
     } elseif ($function == "ManageRecurringPaymentsProfileStatus") {
         return $paypal->ManageRecurringPaymentsProfileStatus($paymentInfo);
     } else {
         return "Function Does Not Exist!";
     }
 }