这个代码片段的payza等效php代码是什么?

时间:2015-04-01 13:11:17

标签: php paypal paypal-ipn

以下是我用于处理我网站付款的代码。这个购物车只有一个项目。此代码适用于paypal。我想在payza上卖同样的物品。

 //process order for paypal

      // Prepare GET data
            $query = array();
            $query['notify_url'] = 'http://mywebsite.com/ipn.php';
            $query['cmd'] = '_cart';
            $query['upload'] = '1';
            $query['business'] = 'payment@mywebsite.com';   

            //main item
            $query['item_name_1'] = $item_name;
            $query['item_number_1'] = '1';
            $query['amount_1'] = $item_price;                           
            $query['currency_code'] = "USD";

            // Prepare query string
            $query_string = http_build_query($query);

         header('Location: https://paypal.com/cgi-bin/webscr?' . $query_string);

1 个答案:

答案 0 :(得分:1)

<form method="post" action="https://secure.payza.com/checkout">
<input type="image" name="Checkout" src="btn_buynow.gif" />
<input type="hidden" name="ap_merchant" value="payza_email"/>
<input type="hidden" name="ap_purchasetype" value="item"/>
<input type="hidden" name="ap_itemname" value="SITENAME"/>          
<input type="hidden" name="ap_itemcode" value="row->id"/>
<input type="hidden" name="ap_description" value="item1_desc"/>
<input type="hidden" name="ap_amount" value="amt"/>
<input type="hidden" name="ap_currency" value="CURRENCY_CODE"/>
<input type="hidden" name="ap_returnurl" value="returnurl"/>
<input type="hidden" name="ap_cancelurl" value="cancelurl"/>
</form>