Code Monkey home page Code Monkey logo

wp-pronamic-pay-buckaroo's Introduction

wp-pronamic-pay-buckaroo's People

Contributors

remcotolsma avatar rvdsteege avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

nielsdeblaauw

wp-pronamic-pay-buckaroo's Issues

Psalm warns for syntax errors

In our automated workflows, Psalm warns for issues regarding syntax errors in some recent changes to this gateway.

Specifically:

ERROR: ParseError - plugins/pronamic-ideal/vendor/wp-pay-gateways/buckaroo/src/Gateway.php:470:5 - Syntax error, unexpected T_NS_SEPARATOR, expecting ',' or ']' or ')' on line 470 (see https://psalm.dev/173)
				\

and

ERROR: ParseError - plugins/pronamic-ideal/vendor/wp-pay-gateways/buckaroo/src/Gateway.php:472:75 - Syntax error, unexpected ',' on line 472 (see https://psalm.dev/173)
				null === $data ? '' : \base64_encode( \md5( $request_content, true ) ),

The issues are also noted in the commit that introduced them: db53d8e by phpstan.

Add `Software` header for partnership

https://docs.buckaroo.io/docs/authentication

Additional Headers (not mandatory)

  • Culture: The user culture if applicable (for example: nl-NL). If not provided, a default of en-US will be used. This will be used in determining the language of both the checkout and the email templates.
  • Channel: The used channel, mostly 'Web' is used (which is default), but in some cases 'Backoffice' is required. Please see the payment method and services sections for the supported channel per service action.
  • Software: A definition of the software used to create the request, this needs be a JSON string in the following format:
    {"PlatformName":"X","PlatformVersion":"1.0","ModuleSupplier":"X","ModuleName":"X","ModuleVersion":"1.0"}

Error "No valid subscription found for service `amex`"

I just came across the following errors with a Buckaroo account for which the American Express card brand is not active, when using the credit card payment method:

Message
	Multiple primary actions specified. Please specify 1 primary action.
Message
	No valid subscription found for service 'amex'.

This is caused by the fact that we're always including amex as a service for the credit card payment method on payment start:

/**
* Payment method creditcard.
*
* @link https://dev.buckaroo.nl/PaymentMethods/Description/creditcards#pay
*/
case Core_PaymentMethods::CREDIT_CARD:
$data->Services->ServiceList[] = (object) array(
'Action' => 'Pay',
'Name' => PaymentMethods::AMERICAN_EXPRESS,
);
$data->Services->ServiceList[] = (object) array(
'Action' => 'Pay',
'Name' => PaymentMethods::MAESTRO,
);
$data->Services->ServiceList[] = (object) array(
'Action' => 'Pay',
'Name' => PaymentMethods::MASTERCARD,
);
$data->Services->ServiceList[] = (object) array(
'Action' => 'Pay',
'Name' => PaymentMethods::VISA,
);
break;

To check if a brand is available for a Buckaroo account, we could use the following endpoints:

In case a brand is not available, the response will be something like:

{
	"SupportedCurrencies": null,
	"Actions": null,
	"Name": "Service Not Found!",
	"Version": 0,
	"Description": null
}

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2006986721/24458

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.