dongli1920 2015-12-01 07:55
浏览 135

使用php的借记卡和信用卡的paypal付款方式

I have integrated Paypal REST API (rest-api-sdk-php) payment gateway in my site. for pay with debit and credit card. I tested that with sandbox, its working fine. some of the reason my live credential are in pending for direct card access.

            //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, '') ;
}

In that api code it checks only with credit card. they doesn't use any function to accept debit card. what i need is. can this code snippet accept debit card payement?

  • 写回答

1条回答 默认 最新

  • dongsui5464 2015-12-01 10:33
    关注

    It should works the same for debit card as long as it is valid for Live environment.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据