2015-12-01 130 views
-2

我在我的網站中集成了貝寶REST API(rest-api-sdk-php)支付網關。用借記卡和信用卡支付。我用沙箱測試了它的工作正常。一些原因是我的活動憑證正在等待直接卡訪問。使用php的借記卡和信用卡的paypal付款方式

  //paypal 
      $cc_first_name  = (isset($_POST['card_holder_name']))? $_POST['card_holder_name'] : die("First Name Empty"); 
      $cc_last_name  = (isset($_POST["card_holder_last_name"]))? $_POST["card_holder_last_name"] : die("Last Name Empty"); 
      $cc_card_type  = (isset($_POST["credit_card_type"]))? $_POST["credit_card_type"] : die("Credit Card type Empty"); 
      $cc_card_number  = (isset($_POST['card_number']))? $_POST['card_number'] : die("Credit Card Number Empty"); 
      $cc_card_month  = (isset($_POST['expiry_month']))? $_POST['expiry_month'] : die("Expire Month Empty"); 
      $cc_card_year  = (isset($_POST['expiry_year']))? $_POST['expiry_year'] : die("Expire Year Empty"); 
      $cc_card_cvv2  = (isset($_POST['cvvCode']))? $_POST['cvvCode'] : die("CVV month empty"); 
      //paypal   


if($_POST["payment_method"] == "credit_card"){ 
    $credit_card = array(
     'type'=> $cc_card_type, 
     'number' => $cc_card_number, 
     'expire_month'=>$cc_card_month, 
     'expire_year'=>$cc_card_year, 
     'cvv2'=>$cc_card_cvv2, 
     'first_name'=>$cc_first_name, 
     'last_name'=>$cc_last_name 
     ); 
    //pay directly using credit card information. 
    $result = pay_direct_with_credit_card($credit_card, PP_CURRENCY , $total_amount, $items, '') ; 
} 

在這個API代碼中,它只檢查信用卡。他們不使用任何功能來接受借記卡。我需要的是。此代碼段可以接受借記卡付款嗎?

回答

-1

對於借記卡,只要它適用於Live環境,它應該同樣適用。

+0

哦,非常感謝paypal_louis。 –

相關問題