2015-04-01 124 views
-3

以下是我用於在我的網站中處理付款的代碼。這輛車只有一個項目。此代碼用於貝寶。我想在payza上賣相同的物品。什麼是這段代碼的payza等效php代碼?

//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'] = '[email protected]'; 

      //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
<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>