mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #897 from woocommerce/PCP-904-pay-pal-transaction-key-meta-field-not-populated-for-pui-payments
PayPal Transaction Key meta field not populated for PUI payments (904)
This commit is contained in:
commit
1d2babf4ad
2 changed files with 8 additions and 2 deletions
|
@ -266,6 +266,11 @@ class PayUponInvoice {
|
|||
$breakdown = $capture->seller_receivable_breakdown();
|
||||
if ( $breakdown ) {
|
||||
$wc_order->update_meta_data( PayPalGateway::FEES_META_KEY, $breakdown->to_array() );
|
||||
$paypal_fee = $breakdown->paypal_fee();
|
||||
if ( $paypal_fee ) {
|
||||
$wc_order->update_meta_data( 'PayPal Transaction Fee', (string) $paypal_fee->value() );
|
||||
}
|
||||
|
||||
$wc_order->save_meta_data();
|
||||
}
|
||||
} catch ( RuntimeException $exception ) {
|
||||
|
|
|
@ -87,11 +87,12 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$breakdown = $capture->seller_receivable_breakdown();
|
||||
if ( $breakdown ) {
|
||||
$wc_order->update_meta_data( PayPalGateway::FEES_META_KEY, $breakdown->to_array() );
|
||||
$wc_order->save_meta_data();
|
||||
$paypal_fee = $breakdown->paypal_fee();
|
||||
if ( $paypal_fee ) {
|
||||
update_post_meta( $wc_order->get_id(), 'PayPal Transaction Key', $paypal_fee->value() );
|
||||
$wc_order->update_meta_data( 'PayPal Transaction Fee', (string) $paypal_fee->value() );
|
||||
}
|
||||
|
||||
$wc_order->save_meta_data();
|
||||
}
|
||||
|
||||
$fraud = $capture->fraud_processor_response();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue