0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PayPal購入画面について

Posted at

"SetExpressCheckoutにて商品名、購入金額等を渡していますが、PayPal購入画面に商品名、購入金額等が表示されなくて困ってます。
指定方法は以下のようになっています。
何か指定方法に不備があるか、わかる方ご解答お待ちしております。

$ec_request =& PayPal::getType('SetExpressCheckoutRequestType');
$ec_request->setVersion(""51.0"");

// Set request-specific fields.
$paymentAmount = ($aPurchaseCommodityInfo->unit_price * $aPurchaseCommodityInfo->amount) + $aPurchaseCommodityInfo->postage;
$currencyID = 'USD'; // or other currency code ('GBP', 'EUR', 'JPY', 'CAD', 'AUD')
$paymentType = 'Sale'; // or 'Order' or 'Authorization'

$ec_details =& PayPal::getType('SetExpressCheckoutRequestDetailsType');
$ec_details->setReturnURL($aReturnUrl);
$ec_details->setCancelURL($aCancelUrl);
$ec_details->setPaymentAction($paymentType);
$ec_details->setNoShipping('1', 'iso-8859-1'); //PayPal画面に配送先住所未表示

$amt_type =& PayPal::getType('BasicAmountType');
$amt_type->setattr('currencyID', $currencyID);
$amt_type->setval($paymentAmount, 'iso-8859-1'); //購入金額
$paymentDetailsItem = &PayPal::getType('PaymentDetailsItemType');
$paymentDetailsItem->setName($aPurchaseCommodityInfo->commodityName); //商品名
$paymentDetailsItem->setQuantity('1', 'iso-8859-1'); //購入数
$paymentDetailsItem->setAmount($paymentAmount, 'iso-8859-1'); //購入金額
$ec_details->setOrderTotal($amt_type); //購入金額合計

$ec_request->setSetExpressCheckoutRequestDetails($ec_details);

$caller =& PayPal::getCallerServices($this->profile);

// Execute SOAP request.
$response = $caller->SetExpressCheckout($ec_request);"

0
0
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?