Paypal notifyUrl响应和completePurchase响应之间有什么区别?
我正在尝试使用omnipay/paypal,我使用以下代码返回URL页面:Paypal notifyUrl响应和completePurchase响应之间有什么区别?,paypal,paypal-ipn,paypal-sandbox,omnipay,Paypal,Paypal Ipn,Paypal Sandbox,Omnipay,我正在尝试使用omnipay/paypal,我使用以下代码返回URL页面: public function completePayment(Request $request) { //return 'pagina dopo acquisto'; $gateway = Omnipay::create('PayPal_Express'); $gateway->setUsername('blastor_89-facilitator_api1.msn.com');
public function completePayment(Request $request)
{
//return 'pagina dopo acquisto';
$gateway = Omnipay::create('PayPal_Express');
$gateway->setUsername('blastor_89-facilitator_api1.msn.com');
$gateway->setPassword('BEWB2BEW9CHCV3EQ');
$gateway->setSignature('AFcWxV21C7fd0v3bYYYRCpSSRl31AC5Dp4AnVYBnMIkNFxSQTj8h.lqD');
$gateway->setTestMode(true);
$params = session()->get('params');
$response = $gateway->completePurchase($params)->send();
$paypalResponse = $response->getData();
//$this->store($paypalResponse);
if(isset($paypalResponse['PAYMENTINFO_0_ACK']) && $paypalResponse['PAYMENTINFO_0_ACK'] === 'Success') {
// here you process the response. Save to database ...
}
else {
// Failed transaction ...
}
}
它使用$paypalResponse进行响应,而如果我使用notifyUrl页面,那么notifyUrl响应是什么呢?有什么不同?这两种回答虽然包含相同的基本思想,但完全不同 完整的购买响应包含来自您调用completePurchase()的数据。notify响应包含从notify(PayPal IPN)调用馈送到应用程序的数据。我建议您转储每个文件中的数据以查看