fix: PayPal查询order 的账户

webht/payment
Lei OT 3 weeks ago
parent c313278459
commit ad1a4386e5

@ -445,6 +445,7 @@ class PaymentService extends CI_Controller {
$paypal_order = isset($memo->resource->supplementary_data) ?$memo->resource->supplementary_data->related_ids->order_id : (isset($memo->resource->application_context) ? $memo->resource->application_context->related_qualifiers[0]->id : ''); $paypal_order = isset($memo->resource->supplementary_data) ?$memo->resource->supplementary_data->related_ids->order_id : (isset($memo->resource->application_context) ? $memo->resource->application_context->related_qualifiers[0]->id : '');
} }
$paypal_account = $item->OPN_fundSource ? $item->OPN_fundSource : 'cht'; $paypal_account = $item->OPN_fundSource ? $item->OPN_fundSource : 'cht';
$paypal_account = 'Highlights' ? 'htravel' : $paypal_account;
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_order, 1)); // log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_order, 1));
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_account, 1)); // log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_account, 1));
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($item->OPN_noticeType, 1)); // log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($item->OPN_noticeType, 1));

@ -642,6 +642,7 @@ class Index extends CI_Controller {
} }
log_message('error',"paypal_webhook" . var_export($raw_post, 1)); log_message('error',"paypal_webhook" . var_export($raw_post, 1));
$post_data = json_decode($raw_post); $post_data = json_decode($raw_post);
log_message('error','paypal_webhook: ' . $post_data->event_type);
if ( if (
strpos($post_data->event_type, 'COMPLETED') === false strpos($post_data->event_type, 'COMPLETED') === false
&& strpos($post_data->event_type, 'REFUNDED') === false && strpos($post_data->event_type, 'REFUNDED') === false

Loading…
Cancel
Save